package org.javaforever.cookieshop.service;

import java.util.List;
import java.util.Set;

import org.javaforever.cookieshop.domain.PageBean;
import org.javaforever.cookieshop.domain.RoleBean;
import org.javaforever.cookieshop.domain.UserBean;

public interface UserService{
	public List<UserBean> listAllUsers() throws Exception;
	public Boolean updateUser(UserBean user) throws Exception;
	public Boolean deleteUser(Long id) throws Exception;
	public Boolean addUser(UserBean user) throws Exception;
	public boolean softDeleteUser(Long id) throws Exception;
	public UserBean findUserById(Long id) throws Exception;
	public UserBean findUserByUserName(String userName) throws Exception;
	public List<UserBean> listActiveUsers() throws Exception;
	public void deleteAllUsers(String ids) throws Exception;
	public void softDeleteAllUsers(String ids) throws Exception;
	public Boolean toggleUser(Long id) throws Exception;
	public Boolean toggleOneUser(Long id) throws Exception;
	public List<UserBean> searchUsersByFieldsByPage(UserBean user,Integer pagesize,Integer pagenum) throws Exception;
	public Boolean activateUser(Long id) throws Exception;
	public void activateAllUsers(String ids) throws Exception;
	public List<UserBean> searchUsersByFields(UserBean user) throws Exception;
	public Boolean cloneUser(Long id) throws Exception;
	public void cloneAllUsers(String ids) throws Exception;
	public Boolean changePasswordUser(UserBean user) throws Exception;
	public String getSaltUser(String userName) throws Exception;
	public String getPasswordUser(String userName) throws Exception;
	public Boolean registerUser(UserBean user) throws Exception;
	public Integer countUserByUserName(String userName) throws Exception;
	public Integer countSearchUsersByFieldsRecords(UserBean user) throws Exception;
	public Integer countActiveUserRecords() throws Exception;
	public Boolean assignRolesToUser(Long userId,String roleIds) throws Exception;
	public Boolean revokeRolesFromUser(Long userId,String roleIds) throws Exception;
	public Set<RoleBean> listActiveUserRolesUsingUserId(Long userId) throws Exception;
	public Set<RoleBean> listAvailableActiveUserRolesUsingUserId(Long userId) throws Exception;
	public PageBean getUserPage(int pageNumber) throws Exception;
}
